package main

import (
	"fmt"
	util "gitee.com/756585379/go-test"
	"time"
)

var (
	FirstName, SecondName, ThirdName string
)

func main() {
	//fmt.Printf("Please enter your full name: ")

	//fmt.Scanln(&FirstName, &SecondName) //Scanln 扫描来自标准输入的文本，将空格分隔的值依次存放到后续的参数内，直到碰到换行。
	//fmt.Scanf("%s %s", &FirstName, &SecondName) //Scanf与Scanln类似，除了 Scanf 的第一个参数用作格式字符串，用来决定如何读取。
	//fmt.Printf("Hi %s %s!\n", FirstName, SecondName)

	//fmt.Scanln(&ThirdName)

	// 合起来写
	go func() {
		i := 0
		for {
			i++
			fmt.Printf("new goroutine: i = %d\n", i)
			time.Sleep(time.Second)
		}
	}()
	i := 0
	for {
		i++
		fmt.Printf("main goroutine: i = %d\n", i)
		time.Sleep(time.Second)
		if i == 2 {
			break
		}
	}

	md5 := util.MD5("123")
	fmt.Println(md5)
}
